package com.cu.simpleerp.frame.session;

import com.cu.simpleerp.system.model.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * session 管理器
 * @author jintian
 * @date 2018/10/23 15:59
 */
public interface SessionManager {

    /**
     * 刷新session
     * @param request
     */
    public void refashSession(HttpServletRequest request);

    /**
     * 去除session
     * @param request
     */
    public void removeSession(HttpServletRequest request);

    /**
     * 添加session
     * @param response
     */
    public void addSession(HttpServletResponse response,HttpServletRequest request,String value);

    /**
     * 检查session是否存在
     * @return
     */
    public boolean checkSession(HttpServletRequest request);

    User getLoginUser(HttpServletRequest request);
}
